﻿using EasyTask.EasyHelper;
using log4net;
using Quartz;
using System.Threading.Tasks;

namespace EasyTask.EasyJobs.Demo
{
    /// <summary>
    /// 写HelloA的Job
    /// </summary>
    [DisallowConcurrentExecution] //让任务中的延迟执行
    class WriteHelloJobA : IJob
    {
        private ILog logger = LogManager.GetLogger(nameof(WriteHelloJob));

        public async Task Execute(IJobExecutionContext context)
        {
            await MailHelper.SendAsync(Config.GetValue("ToMail"), "亲爱的",$"HelloAJob开始运行,时间{System.DateTime.Now}");
        }

    }
}
